home *** CD-ROM | disk | FTP | other *** search
- Path: tank.news.pipex.net!pipex!iol!usenet
- From: David Byrden <goyra@iol.ie>
- Newsgroups: comp.lang.c++
- Subject: Re: pointer questions
- Date: 16 Mar 1996 21:34:46 GMT
- Organization: Ireland On-Line
- Message-ID: <4ifc5m$m8o@nuacht.iol.ie>
- References: <4ifajv$4n7s@uvaix3e1.comp.UVic.CA>
- NNTP-Posting-Host: dialup-184.dublin.iol.ie
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22KIT (Windows; I; 16bit)
-
- you@somehost.somedomain (Colin Gesy) wrote:
-
- >Could someone tell me if there is a difference
- >between the declaration "int *thing_ptr" and
- >"int* thing_ptr" ?
- >Also, what is the difference between "int& data"
- >and "int &data" ?
-
- No differences.
-
-
- >What does the following statement do/mean? :
- >
- > ((searchItem&) *this)._refCount++; //searchItem is the class name
-
- This code comes from a member function of some object, whose address
- is "this". Dereferring "this" gives you the object itself. The object is
- being cast to the class searchItem, probably because it is a base class of
- searchItem. If so, the programmer should be using dynamic_cast<>. Finally,
- a member variable in the searchItem is incremented.
-
- David
-
-
-